package com.likersai.funa.pojo.dto.req.customer;

import com.likersai.funa.pojo.dto.param.customer.CustomerQueryParam;
import com.likersai.funa.pojo.dto.req.PageReq;
import com.likersai.funa.pojo.dto.req.ParamAble;
import lombok.Data;

/**
 * 客户表(Customer)查询入参
 *
 * @author sun.ye
 * @since 2021-07-19 21:24
 */
@Data
public class CustomerReq implements ParamAble<CustomerQueryParam> {

    private String customerName;
    private String customerPhone;

    private PageReq page;

    @Override
    public CustomerQueryParam toParam() {
        CustomerQueryParam customerQueryParam = new CustomerQueryParam();
        customerQueryParam.setCustName(customerName);
        customerQueryParam.setPhone(customerPhone);
        return customerQueryParam;
    }
}